package lab02.test36;
import java.util.Scanner;
public class Test36 {
    public static void main(String[] args) {
        int i;
        Scanner sc=new Scanner(System.in);
        Scanner input=new Scanner(System.in);
Undergraduate undergraduate=new Undergraduate();
Postgraduate postgraduate=new Postgraduate();
//本科学生成绩录入
        System.out.println("请输入第一类别学生个数");
        undergraduate.n=sc.nextInt();
        System.out.println("请输入学生类别");
        undergraduate.Category=input.nextLine();
        System.out.println("请输入"+undergraduate.Category+"类学生姓名");
        for (i=0;i<=undergraduate.n-1;i++){
            undergraduate.name[i]=input.nextLine();
        }
        System.out.println("请输入"+undergraduate.Category+"类每个学生三科成绩");
        for (i=0;i<=undergraduate.n*3-1;i++){
            undergraduate.grade1[i]=sc.nextDouble();
        }


        //研究生成绩录入
        System.out.println("请输入第二类别学生个数");
        postgraduate.n=sc.nextInt();
        System.out.println("请输入学生类别");
        postgraduate.Category=input.nextLine();
        System.out.println("请输入"+postgraduate.Category+"类学生姓名");
        for (i=0;i<=postgraduate.n-1;i++){
            postgraduate.name[i]=input.nextLine();
        }
        System.out.println("请输入"+postgraduate.Category+"类每个三科学生成绩");
        for (i=0;i<=postgraduate.n*3-1;i++){
            postgraduate.grade1[i]=sc.nextDouble();
        }
        System.out.println("姓名 "+"类型 "+"成绩");
        for (i=0;i<=postgraduate.n-1;i++){
            System.out.println(postgraduate.name[i]+" "+ postgraduate.Category+" "+postgraduate.grade());
        }
        for (i=0;i<=undergraduate.n-1;i++){
            System.out.println(undergraduate.name[i]+" "+ undergraduate.Category+" "+undergraduate.grade());
        }

    }

}
